package cn.itcast.dataobject;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Transient;

/**
 * @author: wangxg
 * @date: 2019-06-22 16:52
 **/

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor

public class Account {

    @Id
    @KeySql(useGeneratedKeys = true)
    private Integer id;

    private String name;

    private Double money;

    @Transient
    private String description;

    @Override
    public String toString() {
        return "Account{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", money=" + money +
                '}';
    }
}
